forum

home / developersection / forums / how to found checkbox id

How to found CheckBox ID

Anonymous User 1789 26-Jan-2015

I want to check a checkbox after finding that it is checked in database. I'm trying this:

string chkboxbit = String.Empty;
CheckBox cb = new CheckBox();
chkboxbit = "ct100$ContentPlaceHolder1_chk" + item+ "" + i;
cb = (CheckBox)Page.FindControl(chkboxbit.ToString());
cb.Checked = false;

But I'm getting cb value null on debugging.


Updated on 27-Jan-2015

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By